package bma.common.langutil.core;

import java.util.ArrayList;

import junit.framework.TestCase;

public class ULongGeneratorTC extends TestCase {

	public void testSpendTime() throws Exception {
		ULongGenerator gen = new ULongGenerator(1);
		long begin = System.currentTimeMillis();
		for (int i = 0; i < 4000; i++) {
			gen.next();
		}
		long duration = System.currentTimeMillis() - begin;
		System.out.println(duration);
	}

	public void testGen() throws Exception {
		int c = 4000;
		ArrayList<Long> r = new ArrayList<Long>(c);
		ULongGenerator gen = new ULongGenerator(1);
		for (int i = 0; i < c; i++) {
			long v = gen.next();
			r.add(v);
			System.out.println(v);
		}
	}
}
